//
//  BaseViewController.h
//  CommunityCircle 基控制器
//
//  Created by liuchao on 16/1/11.
//  Copyright © 2016年 ssyx. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseViewModel.h"

@interface BaseViewController : UIViewController

#pragma mark - init
- (void)setupConfigureView;


- (void)setHNavigationTitle:(NSString  *)title;
#pragma mark - head view
- (void)loadHeadView;
- (void)loadHeadView:(NSString  *)title;

- (void)loadHeadView:(NSString *)title showBackBtn:(BOOL)showleft;
- (void)loadHeadView:(NSString *)title
         showLeftBtn:(BOOL)showleft
       leftImageName:(NSString *)leftImageName
           leftTitle:(NSString *)leftTitle;

- (void)loadHeadView:(NSString *)title
         addRightBtn:(BOOL)showRight
      rightImageName:(NSString *)rightImageName
          rightTitle:(NSString *)rightTitle;
- (void)loadHeadView:(NSString *)title
        showRightBtn:(BOOL)showRight
      rightImageName:(NSString *)rightImageName
          rightTitle:(NSString *)rightTitle;

- (void)loadHeadView:(NSString *)title
         showLeftBtn:(BOOL)showleft
        showRightBtn:(BOOL)showRight
       leftImageName:(NSString *)leftImageName
      rightImageName:(NSString *)rightImageName
           leftTitle:(NSString *)leftTitle
          rightTitle:(NSString *)rightTitle;
- (void)headLeftAction;
- (void)headRightAction;
- (void)hiddenLeftButton;


#pragma mark - hud
@property (nonatomic, strong) MBProgressHUD *HUD;
- (CAAnimation *) dzn_imageAnimation;
- (void)showCircleView:(BOOL)show message:(NSString *)message;
- (void)showCircleView:(BOOL)show message:(NSString *)message place:(BOOL)place;
- (void)showLoadViewTo:(UIView *)view hidden:(BOOL)hidden showPlaceholder:(BOOL)place message:(NSString *)message;



#pragma mark - viewModel
/// The `viewModel` parameter in `-initWithViewModel:` method.
@property (nonatomic, strong) BaseViewModel *viewModel;
/// Binds the corresponding view model to the view.
- (void)bindViewModel;
- (void)didViewModelNoMsgWithCompletionBlock:(void (^)(id receive))completionBlock;

- (void)didViewModelWithCompletionBlock:(void (^)(id receive))completionBlock;
- (void)didViewModelWithDelayBlock:(void (^)(id receive))delayBlock;

- (void)didViewModelWithCompletionBlock:(void (^)(id receive))completionBlock
                                showMsg:(BOOL)showMsg
                             delayBlock:(void (^)(id receive))delayBlock;


@end
